count occurrence in a list in python